import request from '@/request/request'

// 分页获取其他入库单
export function getOtherInboundPage(pageParams) {
    return request({
        method: "get",
        url: '/warehouse/otherInbound/page',
        params: pageParams
    })
}

// 创建其他入库单
export function createOtherInbound(otherInbound) {
    return request({
        method: "post",
        url: '/warehouse/otherInbound',
        data: otherInbound
    })
}

// 获取其他入库单详情（包含明细）
export function getOtherInboundWithDetails(id) {
    return request({
        method: "get",
        url: `/warehouse/otherInbound/withDetails/${id}`,
    })
}

// 更新其他入库单
export function updateOtherInbound(otherInbound) {
    return request({
        method: "put",
        url: '/warehouse/otherInbound',
        data: otherInbound
    })
}

// 删除其他入库单
export function deleteOtherInbound(id) {
    return request({
        method: "delete",
        url: `/warehouse/otherInbound/${id}`,
    })
}
